import changeData from 'utils/changeData.js'
export const formLinShi = [
	{
		label: '消防重点单位（必选）',
		prop: 'firefightingUnits',
		type: 'popup',
		placeholder: '是/否',
		rules: [{
			required: true,
			message: '请选择消防重点单位',
			trigger: ['change', 'blur']
		}],
		columns: [{
				name: '是',
				value: '1'
			},
			{
				name: '否',
				value: '2'
			}
		]
	},
	{
		label: '防恐重点单位（必选）',
		prop: 'antiUnit',
		type: 'popup',
		placeholder: '是/否',
		rules: [{
			required: true,
			message: '请选择防恐重点单位',
			trigger: ['change', 'blur']
		}],
		columns: [{
				name: '是',
				value: '1'
			},
			{
				name: '否',
				value: '2'
			}
		]
	},
]
export const formList = [{
		label: '单位名称',
		prop: 'companyName',
		type: 'text',
		placeholder: '请输入单位名称',
		rules: [{
				required: true,
				message: '请输入单位名称',
				trigger: ['change', 'blur']
			},
		]
	},
	{
		label: '统一社会信用代码',
		prop: 'socialCreditCode',
		type: 'text',
		labelPosition:'top',
		rules: [
			{
				required: true,
				pattern: /^(?=.*[A-Z])(?=.*\d)[A-Z0-9]{18}$/,
				message: '请输入正确的统一社会信用代码',
				trigger: ['change', 'blur']
			}
		],
		placeholder: '请输入内容'
	}
];
export const formList1 = [{
		label: '所在地区',
		prop: 'companyProvince',
		type: 'picker',
		placeholder: '请选择所在地区',
		rules: [{
			required: true,
			message: '请选择所在地区',
			trigger: ['change', 'blur']
		}]
	},
	{
		label: '详细地址',
		prop: 'companyPlace',
		type: 'textarea',
		rules: [{
				required: true,
				message: '请输入地址',
				trigger: ['change', 'blur']
			},
		],
		placeholder: '请输入地址'
	}
];
export const formList2 = [{
		label: '所在地区',
		prop: 'registerProvince',
		type: 'picker',
		placeholder: '请选择所在地区',
		rules: [{
			required: true,
			message: '请选择所在地区',
			trigger: ['change', 'blur']
		}]
	},
	{
		label: '详细地址',
		prop: 'registerPlace',
		type: 'textarea',
		rules: [{
				required: true,
				message: '请输入地址',
				trigger: ['change', 'blur']
			},
		],
		placeholder: '请输入地址'
	}
];
export const formList3 = [{
		label: '经营名称',
		prop: 'businessName',
		type: 'text',
		placeholder: '请输入经营名称',
	},
	{
		label: '英文名称',
		prop: 'enName',
		type: 'text',
		placeholder: '请输入英文名称',
		rules: [
			{
				pattern: /^[A-Za-z0-9]*$/g,
				transform(value) {
					return String(value);
				},
				trigger: ['change', 'blur'],
				message: '输入字母或者数字'
			}
		]
	},
	{
		label: '英文缩写',
		prop: 'enAbbreviation',
		type: 'text',
		placeholder: '请输入英文缩写',
		rules: [
			{
				pattern: /^[A-Za-z0-9]*$/g,
				transform(value) {
					return String(value);
				},
				trigger: ['change', 'blur'],
				message: '输入字母或者数字'
			}
		]
	},
	{
		label: '重点单位（必选）',
		prop: 'keyUnit',
		type: 'popup',
		placeholder: '是/否',
		rules: [{
			required: true,
			message: '请选择重点单位',
			trigger: ['change', 'blur']
		}],
		columns: [{
				name: '是',
				value: '1'
			},
			{
				name: '否',
				value: '2'
			}
		]
	},
	
	{
		label: '上级主管/单位',
		prop: 'supervisoryUnit',
		type: 'text',
		placeholder: '请输入上级主管/单位',
	},
	{
		label: '单位类型（必选）',
		prop: 'unitType',
		type: 'popup',
		placeholder: '请选择单位类型',
		rules: [
			{
				required: true,
				message: '请选择单位类型',
				trigger: ['change', 'blur']
			}
		],
		columns: [
			
		]
	},
	{
		label: '经济类型',
		prop: 'economicType',
		type: 'popup',
		code:'economic_type',
		placeholder: '请选择经济类型',
		columns: [
			
		]
	},
	{
		label: '行业类别',
		prop: 'industryCategory',
		type: 'popup',
		code:'industry_category',
		placeholder: '请选择行业类别',
		columns: [
			
		]
	},
	{
		label: '开业时间',
		prop: 'openingDate',
		type: 'datetime',
		placeholder: '请选择时间',
		mode: 'date',
		format: 'YYYY-MM-DD',
	},
	{
		label: '停业时间',
		prop: 'closingDate',
		type: 'datetime',
		placeholder: '请先选择开业时间',
		mode: 'date',
		format: 'YYYY-MM-DD',
		disabled:true
	},
	{
		label: '经营面积/m²',
		prop: 'businessArea',
		type: 'text',
		placeholder: '请输入经营面积',
	},
	{
		label: '经营方式',
		prop: 'businessModel',
		type: 'popup',
		placeholder: '请选择行业类别',
		rules: [{
			message: '请选择经营方式',
			trigger: ['change', 'blur']
		}],
		columns: [
			
		]
	},
	{
		label: '营业执照有效期',
		prop: 'businessLicenseValid',
		type: 'datetime',
		placeholder: '请选择时间',
		mode: 'date',
		rules: [{
			message: '请选择时间',
			trigger: ['change', 'blur']
		}],
		format: 'YYYY-MM-DD'
	},
	{
		label: '联系电话',
		prop: 'phone',
		type: 'text',
		rules: [{
			message: '请输入正确的电话号码',
			pattern: /^(1[3-9]\d{9})$|^(0\d{2,3}[-]?\d{7,8})$/,
			trigger: ['change', 'blur']
		}]
	},
	{
		label: '主营范围',
		prop: 'businessScope',
		type: 'textarea',
		placeholder: '请输入内容'
	},
	{
		label: '兼营范围',
		prop: 'businessConcurrentScope',
		type: 'textarea',
		placeholder: '请输入内容'
	}
];
export const formList4 = [{
		label: '姓名',
		prop: 'legalName',
		type: 'text',
		rules: [
			{
				required: true,
				message: '请输入姓名',
				trigger: ['change', 'blur']
			}]
	},
	{
		label: '电话号码',
		prop: 'legalPhone',
		type: 'text',
		rules: [{
			required: true,
			message: '请输入正确的电话号码',
			pattern: changeData.phonePattern,
			trigger: ['change', 'blur']
		}]
	},
	{
		label: '身份证号码',
		prop: 'legalCard',
		type: 'text',
		rules: [{
			required: true,
			message: '请输入正确的身份证号码',
			validator: changeData.cardRouls,
			trigger: ['change', 'blur']
		}]
	}
];
export const formList5 = [{
		label: '姓名',
		prop: 'chargePersonName',
		type: 'text',
	},
	{
		label: '电话号码',
		prop: 'chargePersonPhone',
		type: 'text',
		rules: [{
			message: '请输入正确的电话号码',
			pattern: changeData.phonePattern,
			trigger: ['change', 'blur']
		}]
	},
	{
		label: '身份证号码',
		prop: 'chargePersonCard',
		type: 'text',
		rules: [{
			message: '请输入正确的身份证号码',
			validator: changeData.cardRouls,
			trigger: ['change', 'blur']
		}]
	}
];